package cn.echogo.framework.widget;

import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.widget.HorizontalScrollView;
import cn.echogo.framework.inter.Loadable;
import cn.echogo.framework.inter.Recyclable;

public class EGGallery extends HorizontalScrollView implements Loadable<String[]>, Recyclable {
	
	private Bitmap[] bitmapArr;

	public EGGallery(Context context) {
		super(context);
	}
	
	public EGGallery(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public EGGallery(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}
	
	@Override
	public void load(String[] imgUrlArr) {
		
	}

	@Override
	public void recycle() {
		if(bitmapArr == null) {
			return;
		}
		for(int i = 0; i < bitmapArr.length; i ++) {
			if(bitmapArr[i] != null && ! bitmapArr[i].isRecycled()) {
				bitmapArr[i].recycle();
				bitmapArr[i] = null;
			}
		}
	}
	
	
}
